package com.rain.qa.client;

import com.rain.qa.client.impl.LabelClientImpl;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 用于指向基础微服务的labelcontroll的方法
 *
 * fallback ：如果服务断了，就会去找实现类下面
 */
@FeignClient(value = "rain-base",fallback = LabelClientImpl.class)  //成为feignclient客户端 value 不支持下划线的名称
public interface LabelClient {

    /**
     * 根据id查询
     * @param id
     * @return
     */
    @RequestMapping(value = "/label/{id}",method = RequestMethod.GET)
    public Result findById(@PathVariable("id") String id);

}
